﻿using DataModel;
using P_PersonalDetails.Service.ContactNumbers;
using P_PersonalDetails.Service.MedicalEmergency;
using P_PersonalDetails.Service.MembershipDetails;
using P_PersonalDetails.Service.PersonalInfo;
using P_PersonalDetails.Service.Qualifications;
using P_PersonalDetails.Service.SlalomRanking;
using P_PersonalDetails.Service.UpdateComplete;

namespace P_PersonalDetails
{
    public static class ServiceConfig
    {
        const string ContactNumbersLocation = "../Services/Members/ContactNumbersService.svc";
        const string MedicalAndEmergencyLocation = "../Services/Members/MedicalEmergencyService.svc";
        const string MembershipDetailsLocation = "../Services/Members/MembershipDetailsService.svc";
        const string PersonalInfoLocation = "../Services/Members/PersonalInfoService.svc";
        const string QualificationLocation = "../Services/Members/QualificationService.svc";
        const string SlalomRankingLocation = "../Services/Members/SlalomRankingService.svc";
        const string UpdateDetailsCompleteLocation = "../Services/Members/UpdateDetailsComplete.svc";

        public static ContactNumbersServiceClient NewContactNumbersClient()
        {
            return ServiceLoader.LoadService(ContactNumbersLocation, (B, E) => new ContactNumbersServiceClient(B, E));
        }
        public static MedicalEmergencyServiceClient NewMedicalAndEmergencyServiceClient()
        {
            return ServiceLoader.LoadService(MedicalAndEmergencyLocation, (B, E) => new MedicalEmergencyServiceClient(B, E));
        }
        public static MembershipDetailsServiceClient NewMembershipDetailsClient()
        {
            return ServiceLoader.LoadService(MembershipDetailsLocation, (B, E) => new MembershipDetailsServiceClient(B, E));
        }
        public static PersonalInfoServiceClient NewPersonalInfoClient()
        {
            return ServiceLoader.LoadService(PersonalInfoLocation, (B, E) => new PersonalInfoServiceClient(B, E));
        }
        public static QualificationServiceClient NewQualificationClient()
        {
            return ServiceLoader.LoadService(QualificationLocation, (B, E) => new QualificationServiceClient(B, E));
        }
        public static SlalomRankingServiceClient NewSlalomRankingClient()
        {
            return ServiceLoader.LoadService(SlalomRankingLocation, (B, E) => new SlalomRankingServiceClient(B, E));
        }
        public static UpdateDetailsCompleteClient NewUpdateDetailsCompleteClient()
        {
            return ServiceLoader.LoadService(UpdateDetailsCompleteLocation, (B, E) => new UpdateDetailsCompleteClient(B, E));
        }

    }
}
